package org.snia.cdmi.exception;

/**
 * <p>Exception that should be mapped to an HTTP Status 401 Response.</p>
 */
public class UnauthorizedException extends RuntimeException {
	private static final long serialVersionUID = -4292675150603167574L;
	
	private String realm = null;

    public UnauthorizedException(String message) {
        super(message);
    }

    public UnauthorizedException(String message, Throwable cause) {
        super(message, cause);
    }

    public UnauthorizedException(Throwable cause) {
        super(cause);
    }

    public UnauthorizedException(String message, String realm) {
        super(message);
        this.realm = realm;
    }

    public UnauthorizedException(String message, Throwable cause, String realm) {
        super(message, cause);
        this.realm = realm;
    }

    public UnauthorizedException(Throwable cause, String realm) {
        super(cause);
        this.realm = realm;
    }

    public String getRealm() {
        return this.realm;
    }

}
